const app = getApp();
Page({
  data: {
    radio: 109,
    chepaihao:'',
    chexinxi: [
      {
          "id": 112,
          "carRank": "劳斯莱斯",
          "carNumber": "冀J66666",
          "carType": "幻影",
          "wellId": 13,
          "wellName": "计算机系统集成事业部",
          "stationId": 1,
          "stationName": "通信公司",
          "userId": null,
          "userName": "1111",
          "telephone": "12312",
          "remark": "正常",
          "mark": 0,
          "stime": "2021-04-22 15:52:19",
          "hasordered": 0,
          "hasordered1": 0,
          "hasordered2": 0,
          "hasordered3": 0
      },
      {
          "id": 111,
          "carRank": "小琴琴",
          "carNumber": "小琴哈哈哈",
          "carType": "猜猜我是谁",
          "wellId": 13,
          "wellName": "计算机系统集成事业部",
          "stationId": 1,
          "stationName": "通信公司",
          "userId": null,
          "userName": "猜不到吧",
          "telephone": "哈哈哈哈",
          "remark": "正常",
          "mark": 0,
          "stime": "2021-04-22 14:57:19",
          "hasordered": 0,
          "hasordered1": 0,
          "hasordered2": 0,
          "hasordered3": 0
      },
      {
          "id": 110,
          "carRank": "别删",
          "carNumber": "小崔别删",
          "carType": "秦别删",
          "wellId": 13,
          "wellName": "计算机系统集成事业部",
          "stationId": 1,
          "stationName": "通信公司",
          "userId": null,
          "userName": "真的别删",
          "telephone": "222222",
          "remark": "正常",
          "mark": 0,
          "stime": "2021-04-22 14:42:09",
          "hasordered": 0,
          "hasordered1": 0,
          "hasordered2": 0,
          "hasordered3": 0
      },
      {
          "id": 109,
          "carRank": "1",
          "carNumber": "冀qin",
          "carType": "qinzhiwei",
          "wellId": 13,
          "wellName": "计算机系统集成事业部",
          "stationId": 1,
          "stationName": "通信公司",
          "userId": null,
          "userName": "秦志伟22aa",
          "telephone": "1383838432",
          "remark": "正常",
          "mark": 0,
          "stime": "2021-04-22 14:40:29",
          "hasordered": 0,
          "hasordered1": 0,
          "hasordered2": 0,
          "hasordered3": 0
      },
      {
          "id": 67,
          "carRank": "轿货车",
          "carNumber": "冀JQC592",
          "carType": "锐骐四驱ZN6494HBN4",
          "wellId": 13,
          "wellName": "计算机系统集成事业部",
          "stationId": 1,
          "stationName": "通信公司",
          "userId": null,
          "userName": null,
          "telephone": null,
          "remark": "正常",
          "mark": 0,
          "stime": "2021-03-18 15:46:48",
          "hasordered": 0,
          "hasordered1": 0,
          "hasordered2": 0,
          "hasordered3": 0
      }
  ],
  checked:false
  },

  selectCarnumber(event) {
    // console.log(123);
    // event.detail 为当前输入的值

    this.setData({
      radio: event.detail
    })
    // console.log(event.detail, '车牌');
  },
  onClick(event) {
    const { name } = event.currentTarget.dataset;
    console.log(name)
    this.setData({
      chepaihao: name,
    });
  }, 
  onChange({ detail }) {
  let _this = this
    if(detail) {
       app.globalData.userRank = 1
       console.log( app.globalData.userRank)
      _this.getTabBar().checkPermission()
    }else {
      app.globalData.userRank = 0
      _this.getTabBar().checkPermission()
    }

    this.setData({ checked: detail });
  },
  onShow() {
    console.log( this.getTabBar())
    this.getTabBar().init()


  }
});